﻿/**********************************************************************
 * @file   FITKAcousticsVTKGraphObjectHybridJunctionPoint.h
 * @brief  混合点连接可视化对象
 * @author BaGuijun (baguijun@163.com)
 * @date   2025-02-10
 *********************************************************************/
#ifndef _FITKAcousticsVTKGraphObjectHybridJunctionPoint_H
#define _FITKAcousticsVTKGraphObjectHybridJunctionPoint_H

#include "FITKAcousticsVTKGraphObjectJunctionBase.h"

namespace Acoustics {
    class FITKHybridJunctionPoint;
}

class vtkUnstructuredGrid;
class vtkSphereSource;
class vtkGlyph3D;
class vtkPoints;
class FITKAcousticsVTKGraphActor;

namespace Exchange
{
    /**
     * @brief  混合点连接可视化对象
     * @author BaGuijun (baguijun@163.com)
     * @date   2025-02-10
     */
    class FITKAcousticsVTKGraphObjectHybridJunctionPoint : public FITKAcousticsVTKGraphObjectJunctionBase
    {
        FITKGraphObjectRegist(FITKAcousticsVTKGraphObjectHybridJunctionPoint, FITKAcousticsVTKGraphObjectJunctionBase);
        FITKCLASS(Exchange, FITKAcousticsVTKGraphObjectHybridJunctionPoint);
        Q_OBJECT;
    public:
        /**
         * @brief    构造函数
         * @param[i] jPoint                            混合点连接对象
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-10
         */
        FITKAcousticsVTKGraphObjectHybridJunctionPoint(Acoustics::FITKHybridJunctionPoint* jPoint);
        /**
         * @brief    析构函数
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-10
         */
        virtual ~FITKAcousticsVTKGraphObjectHybridJunctionPoint();
    protected:
        /**
         * @brief    初始化[重写]
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-10
         */
        void init() override;
        /**
         * @brief    更新可见性
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-10
         */
        void updateVisibility() override;
        /**
         * @brief    生成数据
         * @param[i] junction                       连接对象 
         * @return   bool                           是否成功
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-10
         */
        bool generateDataSet(Acoustics::FITKAbstractJunction* junction) override;
        /**
         * @brief    生成渲染对象
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-10
         */
        void generateGraph() override;
        /**
         * @brief    更新渲染尺寸
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-10
         */
        void updateGlyphSizeByRatio() override;
        /**
         * @brief    重置数据
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-10
         */
        void resetVtkData() override;
    protected:
        /**
         * @brief  点大小
         * @author BaGuijun (baguijun@163.com)
         * @date   2025-02-10
         */
        double m_glyphSize = 30;
        /**
         * @brief  点数据源
         * @author BaGuijun (baguijun@163.com)
         * @date   2025-02-10
         */
        vtkSphereSource* m_pointSource = nullptr;
        /**
         * @brief  图形处理过滤器
         * @author BaGuijun (baguijun@163.com)
         * @date   2025-02-10
         */
        vtkGlyph3D* m_glyph3D = nullptr;
        /**
         * @brief  线点集
         * @author BaGuijun (baguijun@163.com)
         * @date   2025-02-10
         */
        vtkPoints* m_linePoints = nullptr;
        /**
         * @brief  线网格
         * @author BaGuijun (baguijun@163.com)
         * @date   2025-02-10
         */
        vtkUnstructuredGrid* m_lineGrid = nullptr;
        /**
         * @brief  线演员
         * @author BaGuijun (baguijun@163.com)
         * @date   2025-02-10
         */
        FITKAcousticsVTKGraphActor* m_lineActor = nullptr;
    };
}

#endif
